package com.qipay.resource.service;


import com.qipay.resource.entity.Resource;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.InputStream;

/**
 * Creator: Yao
 * Date:    2016/7/21
 * For:
 * Other:
 */
public interface ResourceService {



    public String getContentType(String path);

    public String getFileTypePath(String fileName);

    public String generateUrl(String fileName, boolean isThumbail);

    public String generateUrl(String fileName, int width, int height);

    public boolean checkSize(Resource resource);

    Resource upload(MultipartFile file) throws IOException;

    Resource upload(InputStream is, Resource resource, boolean isThumbail) throws IOException;

    Resource upload(InputStream is, Resource resource, String fileName, int width, int height) throws IOException;

    public String getDefaultAvatar();
}
